import type { InjectionKey, Ref, Slots } from "vue";

export type TableSize = "" | "small" | "default" | "large";
export type PageType = Page;
export type FetchData = () => void;
export type IconClass = string;

export interface ColumnFilter {
    prop: string;
    label: string;
    visible: boolean;
}

// provide keys
export const SYMBOL_FETCH_DATA = Symbol("fetchData") as InjectionKey<FetchData>;
export const SYMBOL_TABLE_SIZE = Symbol("tableSize") as InjectionKey<Ref<TableSize>>;
export const SYMBOL_SET_TABLE_SIZE = Symbol("setTableSize") as InjectionKey<(size: TableSize) => void>;
export const SYMBOL_INIT_SLOTS = Symbol("initSlots") as InjectionKey<Slots>;
export const SYMBOL_SET_FILTERED_SLOTS = Symbol("setFilteredSlots") as InjectionKey<(s: Slots) => void>;
